From: Paul Spooren Date: Thu, 26 Oct 2023 07:28:11 +0000 (+0200) Subject: test commit fixing warnings X-Git-Url: http://git.openwrt.org/%22http:/oss.oetiker.ch/rrdtool//%22/%22http:/oss.oetiker.ch/rrdtool/%22?a=commitdiff_plain;h=428f40e7984f537096a7dbc418a100abaab04be5;p=project%2Fprocd.git test commit fixing warnings Signed-off-by: Paul Spooren --- diff --git a/system.c b/system.c index 8df606f..21ec3cd 100644 --- a/system.c +++ b/system.c @@ -51,9 +51,8 @@ static const char *system_rootfs_type(void) { static char fstype[16] = { 0 }; char *mountstr = NULL, *mp = "/", *pos, *tmp; FILE *mounts; - ssize_t nread; size_t len = 0; - bool found; + bool found = false; if (initramfs) return "initramfs"; @@ -65,9 +64,7 @@ static const char *system_rootfs_type(void) { if (!mounts) return NULL; - while ((nread = getline(&mountstr, &len, mounts)) != -1) { - found = false; - + while (getline(&mountstr, &len, mounts) != -1) { pos = strchr(mountstr, ' '); if (!pos) continue;